#!/bin/bash
# Written at 2015.05.11 by Kevin 

#crontab -e
#0 */1 * * * /root/packages/scripts/delete_nginx_log.sh '/usr/local/nginx/logs' '/usr/local/nginx/sbin' '/usr/local/nginx/conf/nginx.conf'

log_path=${1}
bin_path=${2}
conf_file_path=${3}

rm -rf ${log_path}/*.log
${bin_path}/nginx -c ${conf_file_path} -s reopen

exit $?